﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminM.Master" AutoEventWireup="true" CodeBehind="MAnbao.aspx.cs" Inherits="XqWebSite.WebForm8" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">


        .style6
    {
        width: 174px;
            background-color: #8F9B82;
        }
        .style9
        {
            height: 9px;
        background-color: #8F9B82;
            text-decoration: underline;
        }
    .style8
    {
        text-align: center;
        font-family: 华文隶书;
        font-size: larger;
            color: #A3BAA5;
            background-color: #DDDFDB;
        }
        .style10
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="style1" style="height: 564px; width: 100%;">
        <tr>
            <td class="style6" rowspan="2">
                <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" 
                        StaticDisplayLevels="2" style="font-family: 楷体">
                </asp:Menu>
            </td>
            <td class="style9">
                <asp:SiteMapPath ID="SiteMapPath1" runat="server" style="font-family: 楷体">
                </asp:SiteMapPath>
            </td>
        </tr>
        <tr>
            <td class="style8">
                <table class="style10">
                    <tr>
                        <td>
                            安保人员信息管理</td>
                    </tr>
                    <tr>
                        <td style="text-align: left; color: #000000">
                            安保人员ID:<asp:TextBox ID="Tex_id" runat="server"></asp:TextBox>
                            <asp:Button ID="But_ss" runat="server" Text="搜索" onclick="But_ss_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请输入安保人员ID:<asp:TextBox 
                                ID="TextBox2" runat="server"></asp:TextBox>
                            <asp:Button ID="But_sc" runat="server" Text="删除" Width="43px" 
                                onclick="But_sc_Click" />
                            &nbsp;&nbsp;&nbsp;<asp:Button ID="But_xg" runat="server" Text="修改" Width="64px" 
                                Height="24px" onclick="But_xg_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                                AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ID" 
                                Height="193px" Width="923px">
                                <Columns>
                                    <asp:BoundField DataField="ID" HeaderText="安保人员ID" InsertVisible="False" 
                                        ReadOnly="True" SortExpression="ID" />
                                    <asp:BoundField DataField="username" HeaderText="安保人员名" 
                                        SortExpression="username" />
                                    <asp:BoundField DataField="password" HeaderText="密码" 
                                        SortExpression="password" />
                                    <asp:BoundField DataField="age" HeaderText="年龄" SortExpression="age" />
                                    <asp:BoundField DataField="tel" HeaderText="电话" SortExpression="tel" />
                                    <asp:BoundField DataField="beizhu" HeaderText="备注" 
                                        SortExpression="beizhu" />
                                </Columns>
                            </asp:GridView>
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:WuYeGuanLiConnectionString %>" 
                                DeleteCommand="DELETE FROM [BaoAn] WHERE [ID] = @ID" 
                                InsertCommand="INSERT INTO [BaoAn] ([username], [password], [age], [tel], [beizhu]) VALUES (@username, @password, @age, @tel, @beizhu)" 
                                SelectCommand="SELECT * FROM [BaoAn]" 
                                UpdateCommand="UPDATE [BaoAn] SET [username] = @username, [password] = @password, [age] = @age, [tel] = @tel, [beizhu] = @beizhu WHERE [ID] = @ID">
                                <DeleteParameters>
                                    <asp:Parameter Name="ID" Type="Int64" />
                                </DeleteParameters>
                                <InsertParameters>
                                    <asp:Parameter Name="username" Type="String" />
                                    <asp:Parameter Name="password" Type="String" />
                                    <asp:Parameter Name="age" Type="Int64" />
                                    <asp:Parameter Name="tel" Type="String" />
                                    <asp:Parameter Name="beizhu" Type="String" />
                                </InsertParameters>
                                <UpdateParameters>
                                    <asp:Parameter Name="username" Type="String" />
                                    <asp:Parameter Name="password" Type="String" />
                                    <asp:Parameter Name="age" Type="Int64" />
                                    <asp:Parameter Name="tel" Type="String" />
                                    <asp:Parameter Name="beizhu" Type="String" />
                                    <asp:Parameter Name="ID" Type="Int64" />
                                </UpdateParameters>
                            </asp:SqlDataSource>
                        </td>
                    </tr>
                </table>
                <br />
                <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
            </td>
        </tr>
    </table>
</asp:Content>
